﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Meirimoney.Exchange.Website.Exchange.List" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../Content/default.css" rel="stylesheet" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <table id="details" cellpadding="0" border="0" cellspacing="1px">
            <tbody>
                <tr>
                    <th>积分额度</th>
                    <th>兑换类别</th>
                    <th>收货地址</th>
                    <th>处理状态</th>
                </tr>

                <%for (int i = 0; i < this.Orders.Count; i++)
                  {%>
                <tr>
                    <td>
                        <%=this.Orders[i].IntegralAmount%>
                    </td>
                    <td>
                        <%=this.OperationalTaxonomic( this.Orders[i].ShipAddress)%>
                    </td>
                    <td>
                        <%=this.Server.UrlDecode(this.Orders[i].ShipAddress)%>
                    </td>
                    <td>
                        <%if (this.Orders[i].Status == 1)
                          {%>
                        <a href='/Exchange/Detail.aspx?id=<%=this.Orders[i].Id%>'>未处理</a>
                        <%}
                          else if (this.Orders[i].Status == 0)
                          { %>
                            审核未通过
                        <%}
                          else if (this.Orders[i].Status == 2)
                          { %>
                        处理完成
                        <%} %>
                    </td>
                </tr>
                <% } %>
            </tbody>
        </table>
        <div style="text-align: center; padding: 10px;">当前第<%=this.PageIndex%>页&nbsp;<a href="javascript:foot.previous();">上一页</a>&nbsp;<a href="javascript:foot.next();">下一页</a>&nbsp;共<%=this.PageCount%>页</div>
    </form>
</body>
<script type="text/javascript">
    var foot = {
        status: <%=this.CurrentStatus%>,
        index: <%=this.PageIndex%>,
        count:<%=this.PageCount%>,
        previous: function () {
            if(this.index-1<1)
            {
                alert("当前已经是第一页");
            }
            else
            {
                this.index--;
                window.location.href = this.url(this.index,this.status);
            }
        },
        next: function () {
            if(this.index+1>this.count)
            {
                alert("当前已经是最后一页");
            }
            else
            {
                this.index++;
                window.location.href = this.url(this.index,status);
            }
        },
        url: function (index,status) {
            var _url='List.aspx?i='+index+"&s="+status+"&r="+Math.random();
            return  _url;
        }
    };
</script>
</html>
